package com.lxl.chat.aspect;

/**
 * 基础异常类
 *
 * @date & @author: 2019/1/18 8:59 & lxl
 */
public class BaseException extends RuntimeException {

    private static final long serialVersionUID = -3052617262176190124L;

    private String code;

    private String message;

    private Object data;

    public BaseException(String code, String message, Object data) {
        super(message);
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public BaseException(String code, String message, Object data, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
